Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes and improvements. #417

Merged
merged 8 commits into from
Nov 8, 2021
Merged

Conversation

blackwinter
Copy link
Member

Here are a bunch of fixes and improvements that I didn't feel deserve/justify individual pull requests. Let me know if any of them should be dealt with separately.

  • Fix Gradle deprecation warnings:
    • Dependency declarations: compile -> implementation, runtime -> runtimeOnly
    • Properties: version -> archiveVersion, baseName -> distributionBaseName, extension -> archiveExtension
    • [UNRESOLVED] Plugins: maven -> maven-publish
  • Update README:
  • Enable and fix Java compiler warnings:
    • Deprecated GenericXmlHandler(String): Switched to GenericXmlHandler.setRecordTagName().
    • Static variables qualified by expression: Switched to type name.
    • Unchecked method invocation: Switched to bounded type parameter.
    • Unchecked conversion: Switched to Mockito rule.
    • Unchecked casts, possible fall-throughs: Suppressed.
  • Fix typo in TripleCount constant name:
    • DEFAULT_COUNTP_REDICATE -> DEFAULT_COUNT_PREDICATE
  • Verify that lookup filters missing value. (lookup as filter #372)
  • Expose InlineMorph string representation.
  • Let Checkstyle enforce alphabetical sorting of imports.
  • Configure test logging globally for all subprojects. (Provide common test helpers. #407)
    • INFO/DEBUG messages: Reduced log level for tests to WARN.
    • ERROR message (from ObjectExceptionCatcher): Disabled in test.
    • Missing logger implementation (metafacture-json): Added slf4j-simple.

- The compile configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 7.0. Please use the implementation configuration instead.
- The runtime configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 7.0. Please use the runtimeOnly configuration instead.
- The version property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the archiveVersion property instead.
- The baseName property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the distributionBaseName property instead.
- The extension property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the archiveExtension property instead.

Unresolved:

- The maven plugin has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the maven-publish plugin instead.
- Spelling, formatting, URLs.
- Fixed statement about automatic snapshot builds (cf. #411).
- metafacture-commons/src/main/java/org/metafacture/commons/reflection/ConfigurableClass.java:203: warning: [unchecked] unchecked method invocation: method valueOf in class Enum is applied to given types
- metafacture-biblio/src/main/java/org/metafacture/biblio/ComarcXmlHandler.java:105: warning: [fallthrough] possible fall-through into case
- metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/Marc21Encoder.java:74: warning: [static] static variable should be qualified by type name, RecordFormat, instead of by an expression
- metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/Marc21Encoder.java:160: warning: [static] static variable should be qualified by type name, RecordFormat, instead of by an expression
- metafacture-flowcontrol/src/test/java/org/metafacture/flowcontrol/CloseSuppressorTest.java:34: warning: [unchecked] unchecked conversion
- metafacture-formeta/src/main/java/org/metafacture/formeta/FormetaRecordsReader.java:81: warning: [fallthrough] possible fall-through into case
- metafacture-javaintegration/src/test/java/org/metafacture/javaintegration/pojo/PojoEncoderTest.java:260: warning: [unchecked] unchecked cast
- metafacture-xml/src/test/java/org/metafacture/xml/GenericXMLHandlerTest.java:50: warning: [deprecation] GenericXmlHandler(String) in GenericXmlHandler has been deprecated
E.g., for debugging purposes.
```
org.metafacture.flowcontrol.ObjectExceptionCatcherTest > shouldCatchException STANDARD_ERROR
    [Test worker] ERROR org.metafacture.flowcontrol.ObjectExceptionCatcher - 'Exception Message' while processing object: data

org.metafacture.flowcontrol.ObjectThreaderTest > shouldSplitAllObjectsToAllThreadedDownStreamReceivers STANDARD_ERROR
    [Test worker] INFO org.metafacture.flowcontrol.ObjectThreader - Adding thread 1
    [Test worker] INFO org.metafacture.flowcontrol.ObjectThreader - Adding thread 2

org.metafacture.json.JsonDecoderTest > testShouldProcessRecordsInArrayRoot STANDARD_ERROR
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

org.metafacture.monitoring.StreamLoggerTest > shouldActAsSinkIfNoReceiverIsSet STANDARD_ERROR
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - start record 1
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - start entity entity
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - literal literal=value
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - end entity
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - end record
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - resetStream
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - closeStream

org.metafacture.monitoring.StreamLoggerTest > shouldForwardAllReceivedEvents STANDARD_ERROR
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - start record 1
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - start entity entity
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - literal literal=value
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - end entity
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - end record
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - resetStream
    [Test worker] DEBUG org.metafacture.monitoring.StreamLogger - closeStream

org.metafacture.monitoring.ObjectTimerTest > testShouldHandleImmediateCloseStreamWithNoProcessing STANDARD_ERROR
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Executions: 0; Cumulative duration: 0s; Average duration: 0s
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Time to close stream:  14µs 965ns

org.metafacture.monitoring.ObjectTimerTest > testShouldMeasureExecutionTime STANDARD_ERROR
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Execution 1: 150ms 138µs
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Execution 2: 20ms 82µs
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Execution 3: 30ms 130µs
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Execution 4: 202ms 164µs
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Executions: 4; Cumulative duration: 402ms 515µs; Average duration: 100ms 629µs
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Time to close stream:  6µs 170ns

org.metafacture.monitoring.StreamTimerTest > testShouldHandleImmediateCloseStreamWithNoProcessing STANDARD_ERROR
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Executions: 0; Cumulative duration: 0s; Average duration: 0s
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Time to close stream:  1µs 470ns

org.metafacture.monitoring.StreamTimerTest > testShouldMeasureExecutionTime STANDARD_ERROR
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Execution 1: 150ms 242µs
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Execution 2: 20ms 149µs
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Execution 3: 30ms 123µs
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Execution 4: 202ms 170µs
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Executions: 4; Cumulative duration: 402ms 685µs; Average duration: 100ms 671µs
    [Test worker] INFO org.metafacture.monitoring.TimerBase - Time to close stream:  5µs 111ns

org.metafacture.metamorph.test.validators.StreamValidatorTest > shouldFailIfEndRecordEventIsMissing STANDARD_ERROR
    [Test worker] INFO org.metafacture.metamorph.test.validators.StreamValidator - Event Stream: 1{}
```
@dr0i
Copy link
Member

dr0i commented Nov 8, 2021

+1

@blackwinter blackwinter merged commit 99e88eb into master Nov 8, 2021
@blackwinter blackwinter deleted the variousFixesAndImprovements branch November 8, 2021 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants